<?php

class SFC_Display extends SFC_Array
{
		public function show($layout = DEFAULT_LAYOUT, $h = FALSE, $cacheLength = 0)
		{
			if ($h == TRUE) {
				header('Location: ' . URL . "index.php/$layout");
				}
			
			if (empty($this->dictionary)) {
				$_title = APP_NAME;
			} else {
				foreach ($this->dictionary as $key=>$value) {
					eval("$" . $key . " = \"" . $value . "\";");
				}
			}
			include (DIR_LAYOUT_PATH . 'header' . EXT);
			if (!empty($_message)) {
				echo '<div id="message">' . $_message . '</div>';
			}
			include (DIR_LAYOUT_PATH . $layout . EXT);
			include (DIR_LAYOUT_PATH . 'footer' . EXT);
		}
}

?>
